Fix unitialized variable when moving back onto a single line.
authorOwen Taylor <otaylor@redhat.com>
Tue, 2 Jan 2001 21:43:35 +0000 (21:43 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Tue, 2 Jan 2001 21:43:35 +0000 (21:43 +0000)
Tue Jan  2 16:23:05 2001  Owen Taylor  <otaylor@redhat.com>

* gtk/gtktextlayout.c
(gtk_text_layout_move_iter_to_previous_line): Fix unitialized
variable when moving back onto a single line.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktextlayout.c

index 337ecea524764cf90a92fb953aa82fcc46d39671..1e2aeb61da0bc256f29db8968da05c999b945010 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Jan  2 16:23:05 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktextlayout.c
+       (gtk_text_layout_move_iter_to_previous_line): Fix unitialized
+       variable when moving back onto a single line.
+
 2001-01-01  Havoc Pennington  <hp@redhat.com>
 
        * gtk/Makefile.am (LDFLAGS): add @LIBTOOL_EXPORT_OPTIONS@
index 337ecea524764cf90a92fb953aa82fcc46d39671..1e2aeb61da0bc256f29db8968da05c999b945010 100644 (file)
@@ -1,3 +1,9 @@
+Tue Jan  2 16:23:05 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktextlayout.c
+       (gtk_text_layout_move_iter_to_previous_line): Fix unitialized
+       variable when moving back onto a single line.
+
 2001-01-01  Havoc Pennington  <hp@redhat.com>
 
        * gtk/Makefile.am (LDFLAGS): add @LIBTOOL_EXPORT_OPTIONS@
index 337ecea524764cf90a92fb953aa82fcc46d39671..1e2aeb61da0bc256f29db8968da05c999b945010 100644 (file)
@@ -1,3 +1,9 @@
+Tue Jan  2 16:23:05 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktextlayout.c
+       (gtk_text_layout_move_iter_to_previous_line): Fix unitialized
+       variable when moving back onto a single line.
+
 2001-01-01  Havoc Pennington  <hp@redhat.com>
 
        * gtk/Makefile.am (LDFLAGS): add @LIBTOOL_EXPORT_OPTIONS@
index 337ecea524764cf90a92fb953aa82fcc46d39671..1e2aeb61da0bc256f29db8968da05c999b945010 100644 (file)
@@ -1,3 +1,9 @@
+Tue Jan  2 16:23:05 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktextlayout.c
+       (gtk_text_layout_move_iter_to_previous_line): Fix unitialized
+       variable when moving back onto a single line.
+
 2001-01-01  Havoc Pennington  <hp@redhat.com>
 
        * gtk/Makefile.am (LDFLAGS): add @LIBTOOL_EXPORT_OPTIONS@
index 337ecea524764cf90a92fb953aa82fcc46d39671..1e2aeb61da0bc256f29db8968da05c999b945010 100644 (file)
@@ -1,3 +1,9 @@
+Tue Jan  2 16:23:05 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktextlayout.c
+       (gtk_text_layout_move_iter_to_previous_line): Fix unitialized
+       variable when moving back onto a single line.
+
 2001-01-01  Havoc Pennington  <hp@redhat.com>
 
        * gtk/Makefile.am (LDFLAGS): add @LIBTOOL_EXPORT_OPTIONS@
index 337ecea524764cf90a92fb953aa82fcc46d39671..1e2aeb61da0bc256f29db8968da05c999b945010 100644 (file)
@@ -1,3 +1,9 @@
+Tue Jan  2 16:23:05 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktextlayout.c
+       (gtk_text_layout_move_iter_to_previous_line): Fix unitialized
+       variable when moving back onto a single line.
+
 2001-01-01  Havoc Pennington  <hp@redhat.com>
 
        * gtk/Makefile.am (LDFLAGS): add @LIBTOOL_EXPORT_OPTIONS@
index 337ecea524764cf90a92fb953aa82fcc46d39671..1e2aeb61da0bc256f29db8968da05c999b945010 100644 (file)
@@ -1,3 +1,9 @@
+Tue Jan  2 16:23:05 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktextlayout.c
+       (gtk_text_layout_move_iter_to_previous_line): Fix unitialized
+       variable when moving back onto a single line.
+
 2001-01-01  Havoc Pennington  <hp@redhat.com>
 
        * gtk/Makefile.am (LDFLAGS): add @LIBTOOL_EXPORT_OPTIONS@
index 71c610ef401b7011f744a2af76e53cbb73e1fa79..b95a66c54be189a7bd10490cbe1ee378999f1015 100644 (file)
@@ -2424,14 +2424,8 @@ gtk_text_layout_move_iter_to_previous_line (GtkTextLayout *layout,
         {
           gtk_text_layout_free_line_display (layout, display);
           display = gtk_text_layout_get_line_display (layout, prev_line, FALSE);
-
-          tmp_list = pango_layout_get_lines (display->layout);
-          
-          while (tmp_list->next)
-            {
-              layout_line = tmp_list->data;
-              tmp_list = tmp_list->next;
-            }
+         tmp_list = g_slist_last (pango_layout_get_lines (display->layout));
+         layout_line = tmp_list->data;
 
           line_display_index_to_iter (layout, display, iter,
                                       layout_line->start_index + layout_line->length, 0);